﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Jim.K3Cloud;

/// <summary>
/// 即时库存查询自定义Api接口
/// </summary>
[Sdk("K3Cloud.K3.SCM.WebApi.ServicesStub.InventoryQueryService.GetInventoryData", "即时库存查询自定义Api接口")]
public class K3CloudGetInventoryDataRequest : ISdkRequest<K3CloudGetInventoryDataResponse>
{
    public K3CloudGetInventoryDataRequestData ParamJson { get; set; }

    public void Validate()
    {
    }
}
/// <summary>
/// 即时库存查询参数Model
/// </summary>
public class K3CloudGetInventoryDataRequestData
{
    public string fstockorgnumbers { get; set; }

    public string fmaterialnumbers { get; set; }

    public string fstocknumbers { get; set; }

    public string flotnumbers { get; set; }

    /// <summary>最小库存，不包含最小值</summary>
    public Decimal? fminbaseqty { get; set; }

    /// <summary>最大库存，包含最大值</summary>
    public Decimal? fmaxbaseqty { get; set; }

    /// <summary>是否显示零库存</summary>
    public bool? isshowzeroinv { get; set; }

    /// <summary>最近更新日期</summary>
    public string lastupdatetime { get; set; }

    /// <summary>是否查询仓位信息</summary>
    public bool isshowstockloc { get; set; }

    /// <summary>是否查询辅助属性信息</summary>
    public bool isshowauxprop { get; set; }

    public int pageindex { get; set; } = 1;

    public int pagerows { get; set; } = 100;
}


public class K3CloudGetInventoryDataResponse : SdkResponse<K3CloudGetInventoryData>
{

}

public class K3CloudGetInventoryData
{
    public int Rowcount { get; set; }
    public List<K3CloudGetInventory> Data { get; set; }
}

public class K3CloudGetInventory
{
    public string FID { get; set; }
    public string FSTOCKORGID { get; set; }
    public string FSTOCKORGNUMBER { get; set; }
    public string FSTOCKORGNAME { get; set; }
    public string FKEEPERTYPEID { get; set; }
    public string FKEEPERTYPENAME { get; set; }
    public int FKEEPERID { get; set; }
    public string FKEEPERNUMBER { get; set; }
    public string FKEEPERNAME { get; set; }
    public string FOWNERTYPEID { get; set; }
    public string FOWNERTYPENAME { get; set; }
    public int FOWNERID { get; set; }
    public string FOWNERNUMBER { get; set; }
    public string FOWNERNAME { get; set; }
    public int FSTOCKID { get; set; }
    public string FSTOCKNUMBER { get; set; }
    public string FSTOCKNAME { get; set; }
    public int FSTOCKLOCID { get; set; }
    public string FSTOCKLOC { get; set; }
    public int FAUXPROPID { get; set; }
    public string FAUXPROP { get; set; }
    public string FSTOCKSTATUSID { get; set; }
    public string FSTOCKSTATUSNUMBER { get; set; }
    public string FSTOCKSTATUSNAME { get; set; }
    public int FLOT { get; set; }
    public string FLOTNUMBER { get; set; }
    public int FBOMID { get; set; }
    public string FBOMNUMBER { get; set; }
    public string FMTONO { get; set; }
    public string FPROJECTNO { get; set; }
    public string FPRODUCEDATE { get; set; }
    public string FEXPIRYDATE { get; set; }
    public int FBASEUNITID { get; set; }
    public string FBASEUNITNUMBER { get; set; }
    public string FBASEUNITNAME { get; set; }
    public decimal FBASEQTY { get; set; }
    public decimal FBASELOCKQTY { get; set; }
    public decimal FSECQTY { get; set; }
    public decimal FSECLOCKQTY { get; set; }
    public int FSTOCKUNITID { get; set; }
    public string FSTOCKUNITNUMBER { get; set; }
    public string FSTOCKUNITNAME { get; set; }
    public int FMATERIALID { get; set; }
    public int FMASTERID { get; set; }
    public string FMATERIALNUMBER { get; set; }
    public string FMATERIALNAME { get; set; }
    public decimal FQTY { get; set; }
    public decimal FLOCKQTY { get; set; }
    public int FSECUNITID { get; set; }
    public string FSECUNITNUMBER { get; set; }
    public string FSECUNITNAME { get; set; }
    public string FOBJECTTYPEID { get; set; }
    public decimal FBASEAVBQTY { get; set; }
    public decimal FAVBQTY { get; set; }
    public decimal FSECAVBQTY { get; set; }
    public DateTime FUPDATETIME { get; set; }
}
